#!/bin/bash

if [ "${1}x" == "x" ]; then
echo "Need specify a remote host to access."
exit 1
fi

/bin/ping -c1 -W1 $1 &> /dev/null
if [ $? -ne 0 ]; then
echo "Ping test failed. Please check."
exit 1
fi

#sshpass -p {密码} ssh -p ${端口} {用户名}@{主机IP} 
sshpass -p sina.com ssh -o StrictHostKeyChecking=no root@${1}
